package com.handinglian.ai.common.component;

import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Component;

import java.util.TimeZone;

/**
 * @ClassName: TimeZoneComponent
 * @Description: 解决时区问题
 * @Author: pxl
 * @Create: 2020/1/18 21:11
 **/
@Component
public class TimeZoneComponent {
    static {
        //解决时间的时区问题
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
        JSON.defaultTimeZone = TimeZone.getTimeZone("Asia/Shanghai");
    }
}